package cn.cstech.aijia.ui.project;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

import cn.cstech.aijia.R;
import cn.cstech.aijia.ui.adapter.ProjectListAdapter;
import cn.cstech.aijia.ui.base.BaseActivity;

/**
 * Created by xi on 15/9/14.
 *
 * 装修方案
 */
public class ProjectListActivity extends BaseActivity {


    private ListView listView;
    private ProjectListAdapter adapter;
    private List<String> list;

    @Override
    protected void onCreate(Bundle arg0) {
        super.onCreate(arg0);
        setContentView(R.layout.ac_project_list);
        list = new ArrayList<String>();
        list.add("");
        adapter = new ProjectListAdapter(this,list);
        listView = (ListView) findViewById(R.id.listView);
        listView.setAdapter(adapter);

        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                startActivity(new Intent(ProjectListActivity.this,ProjectDetailActivity.class));
            }
        });
    }

    @Override
    protected void onTitleBarCreate() {
        super.onTitleBarCreate();
        setTitleText("装修方案");
        setLeftImageView(R.drawable.arrow_back, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
